package com.yunxin.core.customer.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 客户信息详情表
 *
 * @TableName customer_info
 */
@TableName(value = "customer_info")
@Data
public class CustomerInfo implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户编号
     */
    @Schema(description = "用户编号")
    private String customerNo;

    /**
     * 腰带申请订单号
     */
    @Schema(description = "腰带申请订单号")
    private String applyOrderNo;

    /**
     * boke订单号
     */
    @Schema(description = "boke订单号")
    private String bokeOrderNo;

    /**
     * boke订单状态
     */
    @Schema(description = "boke订单状态")
    private Integer bokeOrderStatus;

    /**
     * 姓名
     */
    @Schema(description = "姓名")
    private String name;

    /**
     * 手机号
     */
    @Schema(description = "手机号")
    private String phone;

    /**
     * 身份证号
     */
    @Schema(description = "身份证号")
    private String identityNo;

    /**
     * 客户级别
     */
    @Schema(description = "客户级别")
    private Integer level;

    /**
     * 客户描述
     */
    @Schema(description = "客户描述")
    private String ctDescribe;

    /**
     * 客户在用平台
     */
    @Schema(description = "客户在用平台")
    private String usePlatform;

    /**
     * 客户状态 0未处理 1已处理
     */
    @Schema(description = "客户状态 0未处理 1已处理")
    private Integer status;

    /**
     * 渠道id
     */
    @Schema(description = "渠道id")
    private Long channelId;

    /**
     * 渠道name
     */
    @Schema(description = "渠道name")
    private String channelName;

    /**
     * 产品id
     */
    @Schema(description = "产品id")
    private Long productId;

    /**
     * 产品name
     */
    @Schema(description = "产品name")
    private String productName;


    @Schema(description = "对接方式 1.自营 2.h5 3.API 4.企业微信 5微信公众号 6cps")
    private Integer abutmentType;

    /**
     * 申请时间(最初)
     */
    @Schema(description = "申请时间(最初)")
    private Date applyTime;

    /**
     * 团队id
     */
    @Schema(description = "团队id")
    private Integer teamId;

    /**
     * 业务员id
     */
    @Schema(description = "业务员id")
    private Integer salesmanId;

    /**
     * 业务员分配时间
     */
    @Schema(description = "业务员分配时间")
    private Date salesmanTime;

    /**
     * 业务员外呼状态 0未外呼 1已外呼
     */
    @Schema(description = "业务员跟进进度 0未外呼 1已外呼")
    private Integer salesmanStatus;

    /**
     * 客户意向 0未知 -1无意向 1有意向
     */
    @Schema(description = " 客户意向 0未知 -1无意向 1有意向")
    private Integer customerIntention;

    /**
     * 是否添加微信 0未添加 1已添加
     */
    @Schema(description = "是否添加微信 0未添加 1已添加")
    private Integer isWechat;

    /**
     * 客户分数
     */
    @Schema(description = "客户分数")
    private Integer grade;

    /**
     * 话务员id
     */
    @Schema(description = "话务员id")
    private Integer telephonerId;

    /**
     * 话务员跟进进度 0未跟进 -1未接通 1已接通
     */
    @Schema(description = "话务员跟进进度 0未跟进 11不需要 12秒挂 13非本人申请 14点着玩 21空号 22停机 3已添加 -11通话中 -12拒接 -13响铃挂 -14用户忙")
    private Integer telephonerStatus;

    /**
     * 话务员分配时间
     */
    @Schema(description = "话务员分配时间")
    private Date telephonerTime;

    /**
     * 电话次数
     */
    @Schema(description = "电话次数")
    private Integer callCount;

    /**
     * 客户来源
     */
    @Schema(description = "客户来源")
    private Integer source;

    /**
     * 业务员客户来源
     */
    @Schema(description = "业务员客户来源")
    private String salesmanSource;

    /**
     * 话务员客户来源
     */
    @Schema(description = "话务员客户来源")
    private String telephonerSource;


    @Schema(description = "跟进状态")
    private Integer followStatus;

    @Schema(description = "商户id")
    private Long merchantId;

    @Schema(description = "话务最后一次修改状态时间")
    private Date lastFollowTime;
    /**
     * 流失原因
     */
    @Schema(description = "流失原因")
    private String runReason;

    /**
     * 流失状态 1.流失 2.未流失
     */
    @Schema(description = "流失状态 1.流失 2.未流失")
    private Integer runStatus;




    /**
     * 标识删除 0.存在 1.删除
     */
    @TableLogic(value = "0",delval = "1")
    private Integer isDel;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 修改人
     */
    private String editor;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date editTime;

    /**
     * 版本号
     */
    private Long version;

    //关联企微客户后的id 追加 (以便后续溯源) 一个客户允许关联多个微信企业客户 还有就是变更
    private Object wechatFollowIds;

    //取消关联企微客户后的id 追加 (以便后续溯源) 一个客户允许关联多个微信企业客户 还有就是变更
    private Object unWechatFollowIds;

    //话务员转交业务员时间
    private Date telephonerToTime;

    @Schema(description = "业务员客户来源类型（个人,客服）")
    private String salesmanSourceType;

    @Schema(description = "成单时间")
    private Date createOrderTime;

    @Schema(description = "0非公海池数据  1是公海池数据")
    private Integer seasType;
    @Schema(description = "进入公海池时间")
    private Date seasDate;

    public static Integer  RUN_STATUS_LOST = 1;

    public static Integer  WECHAT_SOURCE = 1;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}